﻿namespace ufida.u9.ait.openapi
{
	using System;
	using System.Collections.Generic;
	using System.Text;
    using ufida.u9.ait.openapi.utils;
    using UFIDA.U9.ER.LoanBill;
    using UFSoft.UBF.AopFrame;	
	using UFSoft.UBF.Util.Context;

	/// <summary>
	/// LoanBillSaveSV partial 
	/// </summary>	
	public partial class LoanBillSaveSV 
	{	
		internal BaseStrategy Select()
		{
			return new LoanBillSaveSVImpementStrategy();	
		}		
	}
	
	#region  implement strategy	
	/// <summary>
	/// Impement Implement
	/// 
	/// </summary>	
	internal partial class LoanBillSaveSVImpementStrategy : BaseStrategy
	{
		public LoanBillSaveSVImpementStrategy() { }

		public override object Do(object obj)
		{						
			LoanBillSaveSV bpObj = (LoanBillSaveSV)obj;
			return CodeUtils.DocSaveNT<LoanBillAITDTOData,LoanBill>(bpObj,bpObj.Data,
				LoanBillBase.CreateDoc,
				(doc) =>
				{
                    LoanBillBase.SubmitDoc(doc);
					LoanBillBase.ApproveDoc(doc);
                    return doc;
				}, 
				LoanBillBase.DeleteDoc);

        }		
	}

	#endregion
	
	
}